import 'package:flutter_test/flutter_test.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:security_defend_wall/security_defend_wall.dart';
import 'package:security_defend_wall/security_defend_wall_method_channel.dart';
import 'package:security_defend_wall/security_defend_wall_platform_interface.dart';

class MockSecurityDefendWallPlatform with MockPlatformInterfaceMixin implements SecurityDefendWallPlatform {
  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<bool> isTampered(String signature, String iosTeamId) => Future.value(true);

  @override
  Future<bool> isDebugged() => Future.value(false);

  @override
  Future<bool> isEmulator() => Future.value(false);

  @override
  Future<bool> isRooted() => Future.value(false);
}

void main() {
  final SecurityDefendWallPlatform initialPlatform = SecurityDefendWallPlatform.instance;

  test('$MethodChannelSecurityDefendWall is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelSecurityDefendWall>());
  });

  test('getPlatformVersion', () async {
    SecurityDefendWall securityDefendWallPlugin = SecurityDefendWall();
    MockSecurityDefendWallPlatform fakePlatform = MockSecurityDefendWallPlatform();
    SecurityDefendWallPlatform.instance = fakePlatform;

    expect(await securityDefendWallPlugin.getPlatformVersion(), '42');
  });
}
